using BunnyEater.Common.ResponseOutput;
using BunnyEater.Domain.Base;
using BunnyEater.Service.SystemManagementService.PermissionsService.Dto;
using System.Threading.Tasks;

namespace BunnyEater.Service.SystemManagementService.PermissionsService
{
    /// <summary>
    /// 权限服务接口，提供权限的增删改查及分页等基础功能
    /// </summary>
    public interface IPermissionsService : ITransientService
    {
        /// <summary>
        /// 新增权限
        /// </summary>
        Task<ResponseReturnsEntity<bool>> AddPermissions(PermissionsListDto permissionsDto);
        /// <summary>
        /// 修改权限
        /// </summary>
        Task<ResponseReturnsEntity<bool>> UptPermissions(PermissionsListDto permissionsDto);
        /// <summary>
        /// 删除权限（软删除）
        /// </summary>
        Task<ResponseReturnsEntity<bool>> DeletePermissions(string id);
        /// <summary>
        /// 根据ID获取权限
        /// </summary>
        Task<ResponseReturnsEntity<PermissionsListDto>> GetPermissionsById(string id);
        /// <summary>
        /// 分页查询权限列表
        /// </summary>
        Task<ResponseReturnsEntity<Page<PermissionsListDto>>> GetPagedPermissionsAsync(PermissionsPagedQueryDto query);
        /// <summary>
        /// 修改权限状态
        /// </summary>
        Task<ResponseReturnsEntity<bool>> UpdatePermissionsState(string id, bool state);
    }
}